package com.kongyz.visitor;

import com.kongyz.computer.Computer;
import com.kongyz.computer.Keyboard;
import com.kongyz.computer.Monitor;
import com.kongyz.computer.Mouse;

/**
 * @author kongyz
 * @date 2018/7/11 21:17
 * @Description:
 */
public class ComputerPartDisplayVisitor implements ComputerPartVisitor {
    public void visit(Keyboard keyboard) {
        System.out.println("键盘");
    }

    public void visit(Monitor monitor) {
        System.out.println("显示器");
    }

    public void visit(Mouse mouse) {
        System.out.println("鼠标");
    }

    public void visit(Computer computer) {
        System.out.println("电脑");
    }
}
